<script setup lang="ts">
function handleClickLeft() {
  uni.navigateBack()
}
function toServiceConfig() {
  uni.navigateTo({
    url: '/pages/mobileOrdering/serviceConfig/index',
  })
}
function toTableQrcode() {
  uni.navigateTo({
    url: '/pages/mobileOrdering/tableQrcode/index',
  })
}
</script>

<template>
  <view class="h-full flex flex-col overflow-hidden">
    <wd-navbar title="手机点餐设置" left-text="返回" left-arrow @click-left="handleClickLeft" />
    <scroll-view
      scroll-y
      class="box-border flex-1 overflow-hidden p-[10px]"
      :show-scrollbar="false"
    >
      <wd-cell class="rounded-lg">
        <view class="inline-block">
          <wd-switch size="20px" />
        </view>
        <template #title>
          <wd-text text="扫码点餐" size="16px" color="#333" bold />
        </template>
        <template #label>
          <view>
            <wd-text text=" 顾客到店就餐，扫码下单" size="12px" />
            <view class="mt-2 flex">
              <wd-button
                type="info"
                size="small"
                plain
                :round="false"
                class="!border-border"
                @click="toServiceConfig"
              >
                更改业务配置
              </wd-button>
              <wd-button
                type="info"
                size="small"
                plain
                :round="false"
                class="ml-2 !border-border"
                @click="toTableQrcode"
              >
                下载二维码或链接
              </wd-button>
            </view>
          </view>
        </template>
      </wd-cell>
      <wd-cell class="mt-3 rounded-lg">
        <view class="inline-block">
          <wd-switch size="20px" />
        </view>
        <template #title>
          <wd-text text="预约点餐" size="16px" color="#333" bold />
        </template>
        <template #label>
          <view>
            <wd-text text=" 顾客预约点餐，到店就餐" size="12px" />
          </view>
        </template>
      </wd-cell>
      <wd-cell class="mt-3 rounded-lg">
        <view class="inline-block">
          <wd-switch size="20px" />
        </view>
        <template #title>
          <wd-text text="自提" size="16px" color="#333" bold />
        </template>
        <template #label>
          <view>
            <wd-text text="顾客线上下单，到店自提" size="12px" />
          </view>
        </template>
      </wd-cell>
      <view class="mx-[10px] mt-6">
        <wd-text text="通用设置" bold size="16px" color="#333" />
      </view>
      <wd-cell-group border class="mt-3 rounded-lg">
        <wd-cell
          icon="picture"
          title="菜品推荐"
          label="设置老板推荐、热销、销量等提客单价"
          class="rounded-lg"
          center
          is-link
          to="/pages/mobileOrdering/dishRecommend/index"
        />
        <wd-cell
          icon="picture"
          title="门店装修"
          label="自定义手机点餐页面样式"
          class="rounded-lg"
          center
          is-link
        />
        <wd-cell
          icon="picture"
          title="异常订单处理"
          label="可查看和处理异常订单"
          class="rounded-lg"
          center
          is-link
        />
        <wd-cell
          icon="picture"
          title="更多设置"
          label="菜品隐藏、备注、顾客黑名单、会员相关等"
          class="rounded-lg"
          center
          is-link
          to="/pages/mobileOrdering/moreSetting/index"
        />
      </wd-cell-group>
    </scroll-view>
  </view>
</template>

<style scoped lang="scss"></style>
